package dp.gr03.payroll;

import java.util.GregorianCalendar;
import java.util.HashMap;

public class Paycheck
{

    private double grossPay;
    private double deductions;
    private double netPay;
    private HashMap<String, String> fields;
    private GregorianCalendar startDate;
    private GregorianCalendar endDate;

    public Paycheck(GregorianCalendar startDate, GregorianCalendar endDate)
    {
        this.startDate = startDate;
        this.endDate = endDate;
        fields = new HashMap<String, String>();
    }

    public void setGrossPay(double grossPay)
    {
        this.grossPay = grossPay;
    }

    public void setDeductions(double deductions)
    {
        this.deductions = deductions;
    }

    public void setNetPay(double netPay)
    {
        this.netPay = netPay;
    }

    public double getGrossPay()
    {
        return grossPay;
    }

    public String getField(String key)
    {
        return fields.get(key);
    }

    public double getDeductions()
    {
        return deductions;
    }

    public double getNetPay()
    {
        return netPay;
    }

    public void setField(String key, String value)
    {
        fields.put(key, value);
    }

    public GregorianCalendar getPayPeriodStartDate()
    {
        return startDate;
    }

    public GregorianCalendar getPayPeriodEndDate()
    {
        return endDate;
    }
}
